package com.hare.system_server.controller;


import com.hare.common.result.R;
import com.hare.common.utils.PageUtils;
import com.hare.system_api.dto.SysDictDTO;
import com.hare.system_api.vo.SysDictTypeVO;
import com.hare.system_server.serice.SysDictTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: Hare
 * @description: 字典类型相关Api
 * @author: Hare
 * @create: 2022-11-30 21:35
 * @Version 6.0.1
 **/
@RestController
@RequestMapping("/dictType")
public class SysDictTypeController {

    @Autowired
    SysDictTypeService sysDictTypeService;

    /**
     * 根据名称，类型，状态查询字典信息(分页)
     *
     * @param dto 字典类型信息
     * @return
     */
    @PostMapping("/pageDictType")
    public R<PageUtils<SysDictTypeVO>> pageDictTypeInfo(@RequestBody SysDictDTO dto) {
        return R.success(sysDictTypeService.pageDictTypeInfo(dto));
    }
}
